﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:NamaAlert="clr-namespace:Co9320.NamaAlert">

    <Style x:Key="SmallIconStyle" TargetType="{x:Type Image}">
        <Setter Property="Width" Value="16" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Stretch" Value="None" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
    </Style>

    <Style x:Key="ToolBarArrowButtonStyle" TargetType="{x:Type Image}">
        <Setter Property="Width" Value="5" />
        <Setter Property="Height" Value="5" />
        <Setter Property="Stretch" Value="None" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Source" Value="Images/toolbar_button_arrow.png" />
        <Setter Property="Margin" Value="2" />
    </Style>

    <Style x:Key="ImageButtonBaseStyle" TargetType="{x:Type ButtonBase}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <ContentPresenter Name="Presenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" RenderTransformOrigin="0.5,0.5"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ImageButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource ImageButtonBaseStyle}"/>

    <Style x:Key="ImageToggleButtonStyle" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ImageButtonBaseStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <ContentPresenter Name="Presenter" RecognizesAccessKey="True" RenderTransformOrigin="0.5,0.5"/>
                    <!--  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" -->
                    <!--<ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="RenderTransform" TargetName="Presenter">
                                    <Setter.Value>
                                        <TranslateTransform X="1" Y="1"/>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="True">
                                <Setter Property="RenderTransform" TargetName="Presenter">
                                    <Setter.Value>
                                        <TranslateTransform X="1" Y="1"/>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>-->
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="DropDownButtonBaseStyle" TargetType="{x:Type NamaAlert:DropDownButton}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type NamaAlert:DropDownButton}">
                    <ContentPresenter Name="Presenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" RenderTransformOrigin="0.5,0.5"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="Presenter">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DropDownButtonStyle" TargetType="{x:Type NamaAlert:DropDownButton}" BasedOn="{StaticResource DropDownButtonBaseStyle}"/>

</ResourceDictionary>
